Skip to content

refactor(pumpkin-solver): Do not clone every constraint in the AST - #674

Open
ImkoMarijnissen wants to merge 1 commit into
mainfrom
fix/decrease-memory-usage-ast
Open

ImkoMarijnissen wants to merge 1 commit into
mainfrom
fix/decrease-memory-usage-ast

Conversation

@ImkoMarijnissen

Copy link
Copy Markdown
Contributor

Currently, we clone every constraint in the AST whenever we reserve the constraint tags. This introduces unnecessary memory overhead, especially for models which have many constraints.

Thus, rather than cloning (after which the constraints in the AST are never used again anyway), we mem::take it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant